package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.dto.AlertRuleDto;
import com.zzyl.entity.AlertRule;
import com.zzyl.job.AlertRole;
import com.zzyl.vo.AlertRuleVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.List;

@Mapper
public interface AlertRoleMapper {

    void insertRole( AlertRule alertRule);

    Page<AlertRuleVo> queryPage(String alertRuleName, String functionName, String productKey);

    @Delete("delete from alert_rule where id=#{id}")
    void deleteById(Integer id);

    @Select("select * from alert_rule where id=#{id}")
    AlertRuleVo getById(Integer id);

    void updateById(AlertRule bean);

    List<AlertRule> getAllAlertByThree(String functionId,String iotId,String productKey);
}
